<template>
  <div style="padding: 16px;">
    <h2 style="margin-bottom: 12px;">我的信息</h2>
    <a-descriptions bordered size="small" :column="1">
      <a-descriptions-item label="用户名">{{ user?.username }}</a-descriptions-item>
      <a-descriptions-item label="姓名">{{ user?.realName }}</a-descriptions-item>
      <a-descriptions-item label="电话">{{ user?.tel }}</a-descriptions-item>
      <a-descriptions-item label="创建时间">{{ user?.createdAt }}</a-descriptions-item>
    </a-descriptions>
  </div>
</template>

<script setup>
import { ref, onMounted } from 'vue'

const user = ref(null)

onMounted(() => {
  const userInfo = localStorage.getItem('userInfo')
  if (userInfo) user.value = JSON.parse(userInfo)
})
</script>

<style scoped>
</style>


